import { createApp } from 'vue'

import App from './App.vue'
//  styles
import "@/assets/style/reset.scss";
import "@/assets/style/common.scss"


// 状态
import store from '@/store';
//路由
import router from '@/router'

import { generateRouter } from '@/router'
// ui库
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'


const app = createApp(App)




for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(store)

const boot = async () => {
  await generateRouter()
  app.use(router).use(ElementPlus, { locale: zhCn }).mount('#app')
}

boot()


